package o;

import android.content.Context;
import android.os.Bundle;
import com.huawei.appgallery.foundation.account.bean.UserSession;
import com.huawei.appmarket.service.pay.drm.service.DrmSignService.c;
import com.huawei.appmarket.service.store.awk.bean.SafeAppCardBean;
import com.huawei.hwid.core.constants.HwAccountConstants;
import java.io.UnsupportedEncodingException;
import java.security.GeneralSecurityException;
import java.util.HashMap;
import java.util.Map;

public class ecs {
    public static void ˊ(Context context, c cVar) {
        Logger.ˎ("DrmUtil", "enter getUserId");
        eos.ˎ(ContentManager.getInstant().getContext(), ˊ(context), cVar, "drm_login_type");
    }

    private static Bundle ˊ(Context context) {
        ccr ˋ = new ccr().ˋ(false);
        if (eod.ˋ(context)) {
            ˋ.ॱ(true);
        } else {
            ˋ.ॱ(false);
        }
        ˋ.ˋ(4000000);
        return ˋ.ˊ();
    }

    public static Map<String, String> ˎ() {
        Map<String, String> hashMap = new HashMap();
        hashMap.put("rtnCode", HwAccountConstants.TYPE_SINA);
        hashMap.put("appstore_version", ʽ());
        return hashMap;
    }

    public static Map<String, String> ˏ() {
        Map<String, String> hashMap = new HashMap();
        hashMap.put("rtnCode", "5");
        hashMap.put("appstore_version", ʽ());
        return hashMap;
    }

    public static Map<String, String> ˊ() {
        Map<String, String> hashMap = new HashMap();
        hashMap.put("rtnCode", "1");
        hashMap.put("appstore_version", ʽ());
        return hashMap;
    }

    public static Map<String, String> ˋ() {
        Map<String, String> hashMap = new HashMap();
        hashMap.put("rtnCode", HwAccountConstants.TYPE_SECURITY_PHONE);
        hashMap.put("appstore_version", ʽ());
        return hashMap;
    }

    public static Map<String, String> ॱ() {
        Map<String, String> hashMap = new HashMap();
        hashMap.put("rtnCode", HwAccountConstants.TYPE_TENCENT);
        hashMap.put("account_name", UserSession.getInstance().getUserName());
        hashMap.put("activity_action", "com.huawei.appmarket.intent.action.AppDetail");
        hashMap.put("appstore_version", ʽ());
        return hashMap;
    }

    public static Map<String, String> ʼ() {
        Map<String, String> hashMap = new HashMap();
        hashMap.put("rtnCode", "8");
        hashMap.put("account_name", UserSession.getInstance().getUserName());
        hashMap.put("appstore_version", ʽ());
        return hashMap;
    }

    public static HashMap<String, String> ˏ(String str, String str2) {
        HashMap<String, String> hashMap = new HashMap();
        if (str == null) {
            str = "";
        }
        hashMap.put("signItem", str);
        hashMap.put("payDeviceId", str2);
        hashMap.put("appstore_version", ʽ());
        return hashMap;
    }

    public static HashMap<String, String> ˊ(String str, boolean z) {
        HashMap<String, String> hashMap = new HashMap();
        if (!dof.ॱ(str)) {
            if (z) {
                hashMap.put("rtnCode", SafeAppCardBean.APP_FROM_INTERNET);
                hashMap.put("activity_action", str);
            } else {
                hashMap.put("rtnCode", "9");
            }
            hashMap.put("appstore_version", ʽ());
        }
        return hashMap;
    }

    public static HashMap<String, String> ˏ(String str, boolean z) {
        HashMap<String, String> hashMap = new HashMap();
        if (!dof.ॱ(str)) {
            if (z) {
                hashMap.put("rtnCode", SafeAppCardBean.APP_FROM_INTERNET);
                hashMap.put("activity_action", str);
            } else {
                hashMap.put("rtnCode", "3");
            }
            hashMap.put("appstore_version", ʽ());
        }
        return hashMap;
    }

    public static HashMap<String, String> ˎ(String str, String str2, byte[] bArr) throws GeneralSecurityException, UnsupportedEncodingException {
        HashMap<String, String> hashMap = new HashMap();
        hashMap.put("signItem", eux.ॱ(str, ecp.ˏ().ˋ().getBytes("UTF-8"), bArr));
        hashMap.put("payDeviceId", str2);
        hashMap.put("appstore_version", ʽ());
        return hashMap;
    }

    public static String ʽ() {
        return "70201304";
    }
}
